package com.sso.feign;

import com.aaa.entity.TabMenu;
import com.aaa.entity.TabRole;
import com.aaa.entity.TabUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("system")
public interface UserFeign {
    /**
     * 根据用户名字  获取用户的信息
     */
    @PostMapping("/userApi/name/{name}")
    public TabUser getTabUserByName(@PathVariable String name);

    /**
     * 根据用的id 查询角色的信息
     */
    @PostMapping("/userApi/{uid}")
    public List<TabRole> getRoleByUid(@PathVariable Integer uid);
    /**
     * 根据角色的id 查询资源的信息
     */
    @PostMapping("/userApi/menus/{rids}")
    public List<TabMenu> getMenusByRids(@PathVariable  List<Integer> rids);
}
